package com.seagox.chat.chat.entity;

import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 消息
 */
public class Message {
	
	/**
     * 消息id
     */
    private String msgid;
    
    /**
     * mac
     */
    private String mac;
    
	/**
     * 会话id
     */
    private String sessionId;
    
    /**
     * 发送者
     */
    private String source;

    /**
     * 接收者
     */
    private List<String> target;
    
    /**
     * 分类(1:单聊;2:群聊;3;文件传输助手;)
     */
    private Integer classify;
    
    /**
     * 类型(1:文字;2:图片;3:文件;3:语音;4:视频;)
     */
    private Integer type;
    
    /**
     * 内容
     */
    private String content;
    
    /**
     * 头像
     */
    private String avatar;
    
    /**
     * 昵称
     */
    private String name;
    
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

	public String getMsgid() {
		return msgid;
	}

	public void setMsgid(String msgid) {
		this.msgid = msgid;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public List<String> getTarget() {
		return target;
	}

	public void setTarget(List<String> target) {
		this.target = target;
	}

	public Integer getClassify() {
		return classify;
	}

	public void setClassify(Integer classify) {
		this.classify = classify;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
